﻿<%@ Page Title="Tax Ajent" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="TaxAgent.aspx.cs" Inherits="TestJQGrid.TaxAgent" %>

<%@ Register Assembly="Trirand.Web" Namespace="Trirand.Web.UI.WebControls" TagPrefix="Trirand" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <!-- The jQuery UI theme that will be used by the grid -->
    <link rel="stylesheet" type="text/css" media="screen" href="/themes/redmond/jquery-ui-1.8.2.custom.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="/themes/ui.jqgrid.css" />
    <!-- jQuery runtime minified -->
    <script src="/js/jquery-1.4.4.min.js" type="text/javascript"></script>
    <!-- The localization file we need, English in this case -->
    <script src="/js/trirand/i18n/grid.locale-en.js" type="text/javascript"></script>
    <!-- The jqGrid client-side javascript -->
    <script src="/js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="/js/trirand/jquery.jqDatePicker.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table border="1" width="100%">
        <tr>
            <td align="center">
                <asp:Label ID="pageLable" runat="server" Text="Agent Taxes Adjustments" Font-Size="Medium"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 100%;">
                <Trirand:JQGrid runat="server" ID="JQGrid1" Height="300px" Width="90%" AutoWidth="true"
                    OnRowAdding="JQGrid1_OnRowAdding" OnRowEditing="JQGrid1_OnRowEditing" OnRowDeleting="JQGrid1_RowDeleting"
                    OnDataRequesting="JQGrid1_DataRequesting">
                    <Columns>
                        <Trirand:JQGridColumn DataField="EntryID" PrimaryKey="True" Visible="false" />
                        <Trirand:JQGridColumn DataField="AgentID" Visible="true" Editable="true" EditType="DropDown"
                            EditorControlID="DDAgents" />
                        <Trirand:JQGridColumn DataField="State" Visible="true" Editable="true" EditType="DropDown"
                            EditorControlID="DDStates" />
                        <Trirand:JQGridColumn DataField="TaxType" Editable="true" EditType="DropDown" EditorControlID="DDTax" />
                        <Trirand:JQGridColumn DataField="TaxPercent" Editable="true">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                                <Trirand:NumberValidator />
                                <Trirand:MinValueValidator MinValue="0" />
                                <Trirand:MaxValueValidator MaxValue="100" />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="FromDate" Visible="true" Editable="true" DataType="System.DateTime"
                            DataFormatString="{0:dd/MM/yyyy}" EditType="DatePicker" EditorControlID="datepicker">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="ToDate" Visible="true" Editable="true" DataType="System.DateTime"
                            DataFormatString="{0:dd/MM/yyyy}" EditType="DatePicker" EditorControlID="datepicker">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="IsExclusive" HeaderText="Addable" Visible="true" Editable="true" EditType="DropDown"
                            EditorControlID="DDIsExclusive">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="CreatedBy" Visible="false" />
                        <Trirand:JQGridColumn DataField="CreatedOn" Visible="false" DataType="System.DateTime"
                            DataFormatString="{0:dd/MM/yyyy}" />
                    </Columns>
                    <ToolBarSettings ShowAddButton="true" ShowEditButton="true" ShowDeleteButton="true"
                        ShowRefreshButton="True" ShowSearchButton="True" ShowViewRowDetailsButton="True" />
                    <EditDialogSettings CloseAfterEditing="True" />
                    <AddDialogSettings CloseAfterAdding="true" />
                    <SearchDialogSettings MultipleSearch="true" />
                    <AppearanceSettings ShrinkToFit="false" />
                </Trirand:JQGrid>
                <asp:DropDownList ID="DDAgents" runat="server" DataTextField="AgentName" DataValueField="AgentId">
                </asp:DropDownList>
                <asp:DropDownList ID="DDStates" runat="server" DataTextField="Value" DataValueField="ColumnName">
                </asp:DropDownList>
                <asp:DropDownList ID="DDTax" runat="server" DataTextField="Value" DataValueField="ColumnName">
                </asp:DropDownList>
                <asp:DropDownList ID="DDIsExclusive" runat="server">
                    <asp:ListItem Text="Yes" Value="YES"></asp:ListItem>
                    <asp:ListItem Text="No" Value="NO" Selected="True"></asp:ListItem>
                </asp:DropDownList>
                <Trirand:JQDatePicker ID="datepicker" DateFormat="dd/MM/yyyy" runat="server" DisplayMode="ControlEditor"
                    ChangeMonth="true" ChangeYear="true" />
            </td>
        </tr>
    </table>
</asp:Content>
